﻿@section head{
    <link rel="stylesheet" href="~/plugins/dtree/dtree.css">
    <link rel="stylesheet" href="~/plugins/dtree/font/dtreefont.css">
    <link rel="stylesheet" href="~/css/sysnode/index.css" asp-append-version="true">
}
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>节点管理</legend>
</fieldset>
<div class="container">
    <div class="tree" id="toolbarDiv">
        <ul id="dataTree" class="dtree" data-id="0"></ul>
    </div>
    <div class="form-data">
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">菜单名称</label>
                <div class="layui-input-block">
                    <input type="text" name="Title" id="Title" placeholder="例：用户管理" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">操作名称</label>
                <div class="layui-input-block">
                    <input type="text" name="Name" id="Name" placeholder="例：Index" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item" id="linkItem">
                <label class="layui-form-label">链接</label>
                <div class="layui-input-block">
                    <input type="text" name="Link" id="Link" placeholder="例：/Home/Index" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">是否可见</label>
                <div class="layui-input-block">
                    <select name="DisplayFlag" id="DisplayFlag">
                        <option value="0">不可见</option>
                        <option value="1">可见</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">菜单类型</label>
                <div class="layui-input-block">
                    @Html.Raw(DropDownListHelper.GetDropDownList("DDL_NODE_LEVEL", "", "name='NodeLevel' id='NodeLevel'", ""))
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-block">
                    <input type="text" name="SortNo" id="SortNo" placeholder="排序" class="layui-input" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">菜单分组</label>
                <div class="layui-input-block">
                    @Html.Raw(DropDownListHelper.GetDropDownList("DDL_SYS_GROUP", "", "name='GroupID' id='GroupID'", ""))
                </div>
            </div>
            <div class="layui-form-item" id="IcoCssItem">
                <label class="layui-form-label">图标样式</label>
                <div class="layui-input-block">
                    <input type="text" name="IcoCss" id="IcoCss" placeholder="图标样式" class="layui-input" />
                </div>
            </div>
            <input type="hidden" name="Pid" id="ParentId" />
            <input type="hidden" name="ID" id="ID" />
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <input type="button" lay-submit lay-filter="formData" onclick="save('/SysNode/AddEdit?type=1','/SysNode/Index')" value="添加为子节点" class="layui-btn layui-btn-radius" />
                    <input type="button" onclick="deleteNode()" value="删除该节点" class="layui-btn layui-btn-danger layui-btn-radius" />
                    <input type="button" lay-submit lay-filter="formData" onclick="save('/SysNode/AddEdit?type=2','/SysNode/Index')" value="保存该节点" class="layui-btn layui-btn-normal layui-btn-radius" />
                </div>
            </div>
        </form>
    </div>
</div>

@section foot{
    <script src="~/js/sysnode/index.js" asp-append-version="true"></script>
}

